package com.jack.vipmis.vip.member.service;

import org.springframework.stereotype.Service;

import com.jack.vipmis.common.service.BaseService;
import com.jack.vipmis.vip.member.entity.Member;
import com.jack.vipmis.vip.member.repository.MemberRepository;

/**
 * 
 * @author JackLiang
 * @date 2014-7-4
 * @version 1.0
 */
@Service
public class MemberService extends BaseService<Member, Long> {

	private MemberRepository getMemberRepository() {
		return (MemberRepository) baseRepository;
	}

	public Member findByFirstName(String fieldValue) {
		return getMemberRepository().findByFirstName(fieldValue);
	}

	/**
	 * 
	 * @param phone
	 * @return
	 */
	public Member findByPhone(Long phone) {
		return getMemberRepository().findByPhone(phone);
	}

	/**
	 * 登陆系统
	 * 
	 * @param userName
	 * @param pwd
	 * @return
	 */
	public Member login(long phone, String pwd) {
		return getMemberRepository().login(phone, pwd);
	}

}
